package com.xiaoming.config;

import com.xiaoming.endpoint.DateTimeEndPoint;
import org.springframework.boot.actuate.autoconfigure.endpoint.condition.ConditionalOnEnabledEndpoint;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.context.annotation.Bean;
import org.springframework.stereotype.Controller;

/**
 * 自定义端点配置类
 *
 * @author xiaoming
 * @Date 2020/4/27
 * @blame Android Team
 */
@Controller
public class DateTimeEndpointConfig {

    @Bean
    @ConditionalOnMissingBean
    @ConditionalOnEnabledEndpoint
    public DateTimeEndPoint dateTimeEndPoint(){
        return new DateTimeEndPoint();
    }
}
